var vm = new Vue({
    el: '#app',
    data: {
        list:[
            {
                id:'1',
                name:"张三"
            },
            {
                id:'2',
                name:"李四"
            },
            {
                id:'3',
                name:"王五"
            },
            {
                id:'4',
                name:"赵六"
            }
        ],
        selected1:'',
        selected2:''
    },
    methods:{
        showSelected:function () {
            if(vm.selected1==''){
                alert("选择了空");
            }
        },
        getdate:function (time2) {
            alert(time2);
            var time = new Date(time2);
            var y = time.getFullYear();
            var m = time.getMonth()+1;
            var d = time.getDate();
            var h = time.getHours();
            var mm = time.getMinutes();
            var s = time.getSeconds();
            alert('2');
            return y+'-'+vm.add(m)+'-'+vm.add(d)+' '+vm.add(h)+':'+vm.add(mm)+':'+vm.add(s);
        },
        add:function (m){
            alert(m);
            return m<10?'0'+m:m
        }
    }
})